package com.hotfire.template.common;

import org.springframework.web.context.WebApplicationContext;

public class ApplicationContextManager {
	private static WebApplicationContext attribute;

	public static void setApplicationContext(WebApplicationContext attribute) {
		ApplicationContextManager.attribute = attribute;
	}

	/**
	 * 获取spring bean
	 * @param beanName
	 * @return
	 */
	public static Object getBean(String beanName) {
		if(attribute != null)
			return attribute.getBean(beanName);
		return null;
	}

	public static void getServletRequest(){
		
	}
}
